home *** CD-ROM | disk | FTP | other *** search
/ MacWorld España 14 / macworld_es_14.iso / Share World 14 / Por Categorías / Comunicaciones / ZTerm 1.0.1 ƒ / ZTerm Docs / 4. File Transfers < prev    next >
Text File  |  1995-10-21  |  11KB  |  82 lines

  1. 4.    File Transfers
  2.  
  3. X Y Z Modem
  4. XModem, YModem and ZModem are names of file transfer protocols, which are a set of rules that two computers can use to send a file from one computer to the other.  A protocol will usually provide error detection and correction, by resending the portion that was received in error.  XModem is the first public domain protocol developed for use with personal computers and is one of the most widely supported.  It was developed by Ward Christensen back in 1977.
  5.  
  6. YModem is a variation of XModem that sends an additional block of information before the file is sent.  This block zero contains the file name, size and modification time and date.  Because the file name is sent with the file data, files could be sent in batches, which is why this protocol is sometimes referred to as YModem-Batch.  YModem was developed by Chuck Forsberg in his YAM (Yet Another Modem) program.  
  7.  
  8. YModem-G is a variation of YModem that is useful for direct connections to another computer or when using error correcting modems.  The receiver does not send any ACKs, so the sender just pumps out the file as fast as it can.  If an error is detected, the transfer is stopped.  There is no error recovery.
  9.  
  10. The ZModem protocol was developed for the public domain under a Telenet contract.  Its goal was to “alleviate the throughput problems network customers were experiencing with XMODEM and Kermit file transfers.”  It was developed by Chuck Forsberg/Omen Technology.  It overcomes many weaknesses of older protocols and adds several useful capabilities.  For additional information on the ZModem protocol, look for the file YZMODEM.ARC available on many BBS's, including  TeleGodzilla: 503-621-3746.
  11.  
  12. Omen Technology continues to enhance the ZModem protocol, adding proprietary new features.  The extended protocol is referred to as ZModem-90.  ZTerm does not implement any of these new features because they are not in the public domain, and would require a hefty licensing fee to use them.
  13.  
  14. ZModem
  15. The ZModem file transfer protocol is arguably one of the best general purpose file transfer protocols for personal computers.  Some of its features include:
  16.  
  17. •    various options to let it operate efficiently in a wide range of communication environments.  The most common mode is full streaming, where there is no wait between blocks—the receiver only talks when he has an error.
  18. •    the sequence that starts a file transmission can be detected by the receiving communication software, which can then trigger its receive routines.  This is sometimes referred to as AutoDownload.
  19. •    Crash Recovery - A file transfer that is interrupted by modem disconnection (or other reasons) can be restarted and it will pick up where it left off.  Note: if the Mac crashes or loses power during a transfer, you may not be able to restart the transfer because the partial file was not closed by ZTerm.
  20. •    All ZModem transfers are batch transfers:  multiple files can be sent per transfer, each file is sent with its file name, file size and date of last modification.
  21. •    32 or 16 bit CRC's will error check all blocks: data blocks and control messages.
  22.  
  23.  
  24. For receiving files using the ZModem protocol, just start the sender and ZTerm will detect that it should start receiving files with ZModem.  On the Opus BBS for example, to download the file “newfiles.txt” just type “dz newfiles.txt” and ZTerm will receive it.
  25.  
  26. For sending files using ZModem, ZTerm can send a command sequence to put the receiver in a receive ZModem mode.  In the Settings menu, ZModem Options will bring up a dialog that includes the command to send to put the other end into ZModem receive.  For Opus, this should be set to “uz” followed by a return.  When you select Send ZModem, you will first select what files to send.  When you start the transfer, ZTerm will send the sequence from the ZModem Options and then the transfer will start.
  27.  
  28. Kermit
  29. Kermit is a file transfer protocol that is most common on minicomputers and mainframes.  It has the ability to transfer files in environments where many others cannot.  The most common situation where Kermit is the best choice is when the connection between the two computers only supports 7 data bits for each character.  Kermit was designed by Bill Catchings and Frank da Cruz at Columbia University and has many contributors.
  30.  
  31.  
  32. Binary File Type Detection
  33. ZTerm will detect certain types of binary files, and set the appropriate creator and type for the kind of file.  It detects the type by either looking for a specific sequence of bytes at the start of the file (a signature) or by matching the end of the file name (e.g. the extension of an MS-DOS file).  See the appendix on ZTerm resources for additional information.
  34.  
  35. Text Detection and Conversion
  36. When ZTerm is receiving a file, it inspects the first 128 bytes to determine if it should be treated as a text file.  If all of these bytes are Macintosh printable characters or typical text control characters (return, line feed, tab, etc), then it is considered a text file.  The file type will be set to TEXT and ZTerm will perform End of Line conversion.  If the text has CR/LF at each line end, ZTerm will filter out the LF.  ZTerm currently does not filter any other control characters.
  37.  
  38. Resume an Interrupted Download
  39. If a download is interrupted by disconnection, Cancel, or whatever (but not a power failure - the file won’t be closed properly) it can restart where it left off using ZModem.  A partial file will have the original file name with a bullet (•) at the end.  If you try to download a file and a file with the same name plus a bullet at the end is already in the current receive folder, ZTerm will resume the download where it left off.
  40.  
  41. MacBinary II
  42. ZTerm supports the original MacBinary format for the complete transfer of Macintosh files and their additional file information.  The MacBinary II standard (dated July 1987) is also supported.  The file transfer status dialog will display either ‘MacBinary’ or ‘MacBinary II’ when that format is being used.
  43.  
  44. Performance Log
  45. Each time you transfer a file with ZTerm, it will place an entry in its performance log file.  The file is named “ZTerm Xfer Log” and it is stored in the same directory as ZTerm.  It is a standard TEXT file with TABs between each field, so it can be imported to many spreadsheets, databases, etc.  Since this file could grow large, you may want to periodically rename it.  At the end of the year, I rename mine to have the year at the end of the name.  The transfer log can be disabled in General Preferences.
  46.  
  47. Transfer Efficiency Calculations
  48. I don’t know if there is an accepted procedure for transfer efficiency calculation, so I will just explain how I am currently calculating efficiency.  All ZTerm timings use the Macintosh TickCount, which has a resolution of 1/60th of a second.
  49.  
  50. For receiving files using ZModem or YModem, the clock starts when “block zero” (the block with the file name and other information) is received.  This block zero is not the same as the MacBinary header.  For XModem file receives, the clock starts just before the initial NAK (or whatever) is sent.  The clock stops when all file data is received, written and the file is closed.
  51.  
  52. For sending files using ZModem or YModem, the clock starts after block zero is sent.  For XModem, it starts when ZTerm starts waiting for the initial NAK.  The clock stops on ZModem file sends when the ZRINIT response is received for the ZEOF message.  For YModem and XModem, it stops when the ACK response is received for the EOT message.
  53.  
  54. The CPS figure (characters per second) is the total file bytes (does not include block zero) divided by seconds.  The efficiency figure is CPS times 10 bits per data byte divided by BPS (bits per second, sometimes called baud rate).
  55.  
  56. Hardware Handshake
  57. If you have a high speed modem or one with compression and error control (like MNP, V.42 and V.42bis), you may want to use hardware handshaking to get the most efficient file transfers.  This requires a correctly wired cable and additional modem configuration.  See the section on High Speed Modems.
  58.  
  59. Compressed Files
  60. The files available for download on BBS’s and online services are almost always in a compressed format.  There are several “archive” programs that will compress one or more files into an “archive file.”  In addition to reducing the time to transfer the file, it provides a means to make a package of several related files, so that anyone who downloads a package will get any necessary files.  For example, the ZTerm archive file that I upload contains the program, this documentation file, and several other useful files.  Packaging them together in one archive file will make sure that a downloader will get all the files.
  61.  
  62. Here are the file extensions for the common archive formats.  A file extension (which is more common with non-Mac operating systems) appears at the end of the file name and provides some indication of the type of file.
  63.  
  64. .cpt    Compactor format -- use Compact Pro or Extractor
  65. .hqx    BinHex format -- use BinHex 4.0, BinHex DA, any of the StuffIt programs, Compact Pro, or mcvert (for Unix).
  66. .sit    StuffIt format -- use any of the StuffIt programs.
  67. .sea     Self Extracting Archive.  Double-clicking on this should give you the uncompressed file.
  68. .pit     PackIt format, not used much any more -- use PackIt or any of the StuffIt programs.
  69. .image    DiskCopy images of a floppy disk.  This is the format used for the System software on many services.  Use the DiskCopy application to translate these back onto disks.
  70. .Z    Unix 'compress' files.  Uncompress with the Unix command 'uncompress' or on the Mac with MacCompress (available from sumex).
  71. .tar    Unix tar (tape archive) file.
  72. .dd    DiskDoubler format.  Use DiskDoubler or DDExpand.
  73.  
  74.  
  75. CompuServe B-Plus and Quick-B
  76. CompuServe has its own file transfer protocol that is very efficient.  Quick-B was an interim protocol that was established while they finalized their current enhanced protocol which they call B-Plus.  When CompuServe asks you what protocol to use for downloading, you should pick the B-Plus option.  The QuickB option will also work just fine.  There is no menu entry to start a B-Plus transfer; CompuServe will send a sequence that will start the download.  Note: You must enable this option in the Transfer Options Settings.
  77.  
  78. Bonus Secret Feature #1:
  79. If you are using an Opus BBS system, and ask for a file listing and you see a file you would like to download, just hold down the Command key and double click on the file name.  ZTerm will send “d z ” followed by the name that you double clicked, then a RETURN.  I would like to eventually make this feature more general to work with different systems.
  80.  
  81.  
  82.